import request from '../request'
//分类的接口
let CATE_URL = '/home/category/head'
//banner上的分类
let BRAND_URL = '/home/brand'
// banner上的图片
let BANNER_URL = '/home/banner'
//新鲜好物的
let XXHW_URL = '/home/new'
//人气推荐
let RQTJ_URL = '/home/hot'
//热门推荐
let RMPP_URL = '/home/brand'
//  产品数据
let CPSJ_URL = '/home/goods'
// 最新专题
let ZXZT_URL='/home/special'
//分类数据的设置api
export function getCate() {
    return request({
        url: CATE_URL,
        method: 'get'
    })
}

//分类数据的设置api
export function getBrand(limit = 6) {
    return request({
        url: BRAND_URL,
        method: 'get',
        params: { limit }
    })
}

//banner轮播数据的设置api
export function getBanner(distributionSite = 1) {
    return request({
        url: BANNER_URL,
        method: 'get',
        params: { distributionSite }
    })
}

//新鲜好物数据的设置api
export function getXxhw(limit = 4) {
    return request({
        url: XXHW_URL,
        method: 'get',
        params: { limit }
    })
}

//人气推荐数据的设置api
export function getRqtj() {
    return request({
        url: RQTJ_URL,
        method: 'get',
    })
}
//热门品牌数据的设置api
export function getPopular(limit = 5) {
    return request({
        url: RMPP_URL,
        method: 'get',
        params: { limit }
    })
}
//居家母婴等数据的设置api
export function getchangpinapi() {
    return request({
        url: CPSJ_URL,
        method: 'get',
      
    })
}
//最新专题
export function getzuixinapi() {
    return request({
        url: ZXZT_URL,
        method: 'get',
      
    })
}